/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.agh.student.logic.util;

import org.jbpm.api.Deployment;
import org.jbpm.api.NewDeployment;
import org.jbpm.api.RepositoryService;
import org.jbpm.pvm.internal.repository.DeploymentImpl;

/**
 *
 * @author janburkot
 */
public class DeployServiceImpl implements DeployService {

        private RepositoryService repositoryService;


        public void deploy(String processDefinition) {
                NewDeployment deployment = repositoryService.createDeployment();
                deployment.addResourceFromClasspath(processDefinition);
                deployment.deploy();
        }
        
        public void setRepositoryService(RepositoryService repositoryService) {
                this.repositoryService = repositoryService;
        }

}
